package com.service.impl;

import com.dao.HallDAO;
import com.entity.Hall;
import com.service.HallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class HallServiceImpl implements HallService {

	@Qualifier("hallDAO")
	@Autowired
	private HallDAO hallDAO;

	@Override // 继承接口的新增 返回值0(失败),1(成功)
	public int insertHall(Hall hall) {
		return this.hallDAO.insertHall(hall);
	}

	@Override // 继承接口的更新 返回值0(失败),1(成功)
	public int updateHall(Hall hall) {
		return this.hallDAO.updateHall(hall);
	}

	@Override // 继承接口的删除 返回值0(失败),1(成功)
	public int deleteHall(String hallid) {
		return this.hallDAO.deleteHall(hallid);
	}

	@Override // 继承接口的查询全部
	public List<Hall> getAllHall() {
		return this.hallDAO.getAllHall();
	}

	@Override // 继承接口的按主键查询 返回Entity实例
	public Hall getHallById(String hallid) {
		return this.hallDAO.getHallById(hallid);
	}

}
